#include "ia.hpp"

Ia::Ia(std::bitset<1444> *map, bool double3, bool latePrise, int player, Judge *judge)
{
	this->double3 = double3;
	this->latePrise = latePrise;
	this->map = map;
	this->judge = judge;
	this->nbrCoup = 0;
	this->player = player;
	this->curX = 0;
	this->curY = 0;
	this->_weighting["catch"][0] = 10;
	this->_weighting["catch2"][0] = 20;
	this->_weighting["catch3"][0] = 30;
	this->_weighting["catch4"][0] = 40;
	this->_weighting["victory"][0] = 1000;
	this->_weighting["catch"][1] = 10;
	this->_weighting["catch2"][1] = 20;
	this->_weighting["catch3"][1] = 30;
	this->_weighting["catch4"][1] = 40;
	this->_weighting["victory"][1] = 1000;
}

int		Ia::tryPlay(int player, int x, int y, std::bitset<1444> *map)
{
	return 1;
}

void	Ia::startArbre()
{
	
}

void	Ia::min_max()
{
	/*
	while (on a pas tester toutes les cases)
	{
		this->startArbre();
	}
	*/
}

void	Ia::play()
{
	if (this->nbrCoup == 0)
	{
		this->nbrCoup++;
		if (this->judge->play(this->player, 9, 9))
			return;
		if (this->judge->play(this->player, 9, 10))
			return;
	}
	//this->min_max();
}